<template>
  <div class="pageWrapper">
    <common-header />
    <regulation-content :content="content" v-if="content.id" />
    <common-empty v-else message="还未设置考核制度<br />请联系单位管理员添加考核制度说明" />
  </div>
</template>

<script>
import regulationContent from "./components/content.vue";
import { getRegulation } from "@/api/regulation";
export default {
  components: {
    regulationContent
  },
  created() {
    this.form.deptId = this.$route.query.deptId;
    this.form.assessType = this.$route.query.type;
    this.initData();
  },
  data() {
    return {
      active: 0,
      form: {
        assessType: 0,
        deptId: 0
      },
      content: {}
    };
  },
  methods: {
    initData() {
      getRegulation(this.form).then(res => {
        this.content = res.data
      });
    }
  }
};
</script>

<style scoped lang="scss"></style>
